(C) 1996 AROS - The Amiga Replacement OS


NAME
#include <exec/interrupts.h>
#include <proto/exec.h>
void Cause()
SYNOPSIS
struct Interrupt * softint

LOCATION
In SysBase at offset 30
FUNCTION
Schedule a software interrupt to occur. If the processor is currently running a user task, then the software interrupt will prempt the current task and run itself. From a real interrupt, it will queue the software interrupt for a later time.

Software interrupts are useful from hardware interrupts if you wish to defer your processing down to a lower level. They can also be used in some special cases of device I/O. The timer.device and audio.device allow software interrupt driven timing and audio output respectively.

Software interrupts are restricted to 5 different priority levels, +32, +16, 0, -16, -32.

Software interrupts can only be scheduled once.

The software interrupt is called with the following prototype:

AROS_UFH3(void, YourIntCode, AROS_UFHA(APTR, interruptData, A1), AROS_UFHA(APTR, interruptCode, A5), AROS_UFHA(struct ExecBase *, SysBase, A6))

The interruptData is the value of the is_Data field, interruptCode is the value of the is_Code field - it is included for historical and compatibility reasons. You can ignore the value of interruptCode, but you must declare it.

INPUTS
softint
The interrupt you wish to schedule. When setting up you should set the type of the interrupt to either NT_INTERRUPT or NT_UNKNOWN.
RESULT
The software interrupt will be delivered, or queued for later delivery.

NOTES
No bounds checking on the software interrupt priority is done. Passing a bad priority to the system can have a strange effect.

EXAMPLE
BUGS
Older versions of the Amiga operating system require that the software interrupts preserve the A6 register.

Software interrupts which are added from a software interrupt of lower priority may not be called immediately.

SEE ALSO
INTERNALS
HISTORY
05.08.1997 iaint
Kernel Changes - These are mostly functions which are normally implemented by the kernel, but might not be.
12.05.1997 aros
Fixed all headers
01.01.1997 ldp
Committed Amiga native (support) code

Changed clib to proto

10.12.1996 aros
Moved all #include's in the first column so makedepend can see it.
24.10.1996 aros
Use the official AROS macros over the __AROS versions.
21.10.1996 aros
Changed interrupt to Interrupt, because it was interfering with a compiler keyword.
13.08.1996 digulla
The function was missing. Must be filled with code